<template>
    <el-main>
        <el-form :inline="false" class="demo-form-inline">
            <el-form-item label="商品名称">
                <el-input v-model="saveForm.name" clearable placeholder="商品名称"></el-input>
            </el-form-item>
            <el-form-item label="商品描述">
                <el-input v-model="saveForm.desc" clearable placeholder="商品描述"></el-input>
            </el-form-item>

            <el-form-item>
                <el-button type="primary" @click="save">查询</el-button>
            </el-form-item>
        </el-form>
    </el-main>
</template>

<script>
    export default {
        name: "Product",
        data() {
            return {
                saveForm:{}
            }
        },
        methods:{
            save() {
                this.axios.post("http://localhost:8888/product/save",this.saveForm).then(res=>{
                    if (res.data.result) {
                        this.$message("保存成功");
                    }else{
                        this.$message(res.data.message);
                    }
                })
            }
        }
    }
</script>

<style scoped>

</style>